package org.caowei.samples.dao;

import java.util.List;

import org.caowei.samples.model.UserSubject;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;


@Repository
public class FUserSubjectDAOImp extends BaseHibernateDAO<UserSubject> implements FUserSubjectDAO{

	@Override
	@Transactional
	public List<UserSubject> findAll() {
		String hql="From UserSubject ";
		return find(hql);
	}

	@Override
	public List<UserSubject> find(int userid) {
		String hql="from UserSubject as ex where ex.user.userId="+userid+"";
		 return find(hql);
		

	}
}
